package JavaSE.Class11.Computer;

public class PC{
    public void open(){
        System.out.println("Open");
    }

    public void close(){
        System.out.println("Close");
    }

    public void useUSB(USB usb){
        usb.open();
        if(usb instanceof Mouse){
            Mouse mouse = (Mouse)usb;
            mouse.Click();
        }else{
            KeyBoard keyBoard=(KeyBoard)usb;
            keyBoard.Input();
        }
        usb.close();
    }

}
